/*
	off_t lseek(int fileds, off_t offset, int whence);

	whence:
		SEEK_SET: seek_cur = offset;
		SEEK_CUR: seek_cur = seek_cur + offset;
		SEEK_END: seek_cur = seek_end + offset
*/

/* 测试标准输入能否被设置位移量 */

#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>

int main(int argc, char * argv[]) {
	if(lseek(STDIN_FILENO, 0, SEEK_CUR) == -1)
		fprintf(stderr, "%s\n", "cannot seek.");
	else
		fprintf(stdout, "%s\n", "seek OK.");

	return 0;
}
